package FTLtest;

import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;

import java.io.*;
import java.util.HashMap;
import java.util.Map;

public class FreemarkerTest2 {
    public static void main(String[] args) throws IOException, TemplateException {
        Configuration cft = new Configuration(Configuration.VERSION_2_3_28);
        cft.setDirectoryForTemplateLoading(new File("templ"));
        Map map = new HashMap();
        Template temp = cft.getTemplate("test2.ftl");
        Writer out = new OutputStreamWriter(new FileOutputStream("templ/hehe.java"));
        temp.process(map,out);
        out.flush();
    }
}
